/* 工作台*/
import WORKBENCH from 'service/apis/workBench'
import Request from 'service/request'

// 获取设备数量
export async function getDeviceAmount() {
    return Request({ url: WORKBENCH.DEVICE_AMOUNT + '?ver=' + (new Date()).getTime() })
}

// 获取维修任务数量
export async function getRepariMount() {
    return Request({ url: WORKBENCH.REPAIR_AMOUNT + '?ver=' + (new Date()).getTime() })
}

// 获取点检计划数量
export async function getCheckAmount() {
    return Request({ url: WORKBENCH.CHECK_AMOUNT +'?ver=' + (new Date()).getTime()})
}

// 获取检定计划数量
export async function getAssayAmount() {
    return Request({
        url: WORKBENCH.ASSSAY_AMOUNT + '?ver=' + (new Date()).getTime(),
        data: {},
        method: 'POST'
    })
}

// 获取保养计划数量
export async function getMaintainAmount() {
    return Request({
        url: WORKBENCH.MAINTAIN_AMOUNT + '?ver=' + (new Date()).getTime(),
        data: {},
        method: 'POST'
    })
}

// 待审批统计
export async function approvalPending() {
    return Request({
        url: WORKBENCH.APPROVAL_PENDING + '?ver=' + (new Date()).getTime(),
        data: {},
        method: 'POST'
    })
}

// 今日任务
export async function dailyTask(params) {
    return Request({
        url: WORKBENCH.DAILY_TASK + '?ver=' + (new Date()).getTime(),
        data: params,
        method: 'POST'
    })
}
